<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center wodefabu_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub wodefabu_fd0_0'>
          <view class='flex flex-wrap align-center wodefabu_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  wodefabu_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='wodefabu_fd0_0_c1_c0'>我的发布</text>
          </view>
          <view class='flex flex-wrap align-center justify-end wodefabu_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view>
          <benben-flex-tabs class-name='wodefabu_benbenTabsfd1_0' v-model="tabsTypefd1_0" ref="benben_tabsfd1_0"
            select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='false' :top='0'
            @change="getListFunc()" :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd1_0">

            <scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
              class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd1_0.moveX"
              scroll-with-animation="all .3s ease">
              <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
                <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex flex align-center justify-around">
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '-1', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '-1'" :id="`benben_tabsfd1_0-title-item-${'-1'}`">

                    <text>全部</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '0', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

                    <text>正在展示</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': tabsTypefd1_0 == '1', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd1_0 = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

                    <text>已下架</text>

                  </view>

                </view>
                <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
                  id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line wodefabu_linefd1_0">
                </view>
              </view>
            </scroll-view>

          </benben-flex-tabs>

        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub wodefabu_fd2_0' @tap.stop="handleJumpDiy"
          v-for="(item,index) in dataList" :key="index" data-type="navigateTo"
          :data-url="`/pages/grzx/fabuxiangqing/fabuxiangqing?id=${item.aid}`">
          <view class='flex flex-wrap align-center self-center justify-between flex-sub wodefabu_fd2_0_c0'>
            <text>{{item.create_time}}</text>
            <text class='wodefabu_fd2_0_c0_c1'>{{item.status_text}}</text>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch wodefabu_fd2_0_c1' v-if="leixing==1">
            <view class='flex flex-wrap align-center justify-between flex-sub'>
              <text class='wodefabu_fd2_0_c1_c0_c0'>{{item.zhiweimingcheng}}</text>
              <view class='flex flex-wrap align-center'>
                <image class='wodefabu_fd2_0_c1_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"150.png"'></image>
                <text class='wodefabu_fd2_0_c1_c0_c1_c1'>{{item.views}}</text>
              </view>
            </view>
            <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c1'>
              <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c1_c0'
                style="background-color:rgba(58, 167, 161, 0.6);color: #FFF;">
                <text>{{item.worknature_name}}</text>
              </view>
              <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c1_c0'
                v-for="(itemA,indexA) in item.postcate_name" :key="indexA">
                <text>{{itemA}}</text>
              </view>

            </view>
            <text class='wodefabu_fd2_0_c1_c2'>工作地点：{{item.workplace_name}}</text>
            <view class='flex flex-wrap align-center justify-between wodefabu_fd2_0_c1_c3'>
              <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c3_c0'>
                <image class='wodefabu_fd2_0_c1_c3_c0_c0' mode="aspectFill" :src='item.avatar'></image>
                <text>{{item.user_nickname}}</text>
              </view>
              <text class='wodefabu_fd2_0_c1_c0_c1_c1'>{{item.gongsimingcheng}}</text>
            </view>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch wodefabu_fd2_0_c1' v-if="leixing==0">
            <view class='flex flex-wrap align-center justify-between flex-sub'>
              <text class='wodefabu_fd2_0_c1_c0_c0'>
                <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c3_c0'>
                  <image class='wodefabu_fd2_0_c1_c3_c0_c0' mode="aspectFill" :src='item.avatar'></image>
                  <text>{{item.user_nickname}}</text>
                </view>
              </text>
              <view class='flex flex-wrap align-center'>
                <image class='wodefabu_fd2_0_c1_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"150.png"'></image>
                <text class='wodefabu_fd2_0_c1_c0_c1_c1'>{{item.views}}</text>
              </view>
            </view>
            <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c1'>
              <!-- <view class='flex flex-wrap align-center wodefabu_fd2_0_c1_c1_c0'
                style="background-color:rgba(58, 167, 161, 0.6);color: #FFF;">
                <text>{{item.worknature_name}}</text>
              </view> -->
              <view class='flex flex-wrap align-center text-sm wodefabu_fd2_0_c1_c1_c0'
                style="background-color: #FFFFFF; color: #333;" v-for="(itemA,indexA) in item.postcate_name"
                :key="indexA">
                <text>{{itemA}}</text>
              </view>
            </view>
            <text class='bg-white text-cut-2 wodefabu_fd2_0_c1_c2_1'>{{item.gerenjianjie || '暂无'}}</text>
            <view class='flex flex-wrap align-center justify-between wodefabu_fd2_0_c1_c3'>

              <text class='wodefabu_fd2_0_c1_c0_c1_c1'>期望工作地点：{{item.workplace_name}}</text>
            </view>
          </view>
          <view class='flex flex-wrap align-center justify-between'>
            <text class='wodefabu_fd2_0_c2_c0' v-if="item.shengyuDay">剩余天数：{{item.shengyuDay}}天</text>
            <view class='wodefabu_fd2_0_c2_c0' v-if="!item.shengyuDay"></view>
            <view class='flex flex-wrap align-center'>
              <view class='flex flex-wrap align-center self-center justify-center wodefabu_fd2_0_c2_c1_c0'>
                <text>删除</text>
              </view>
              <view v-if="item.status==1"
                class='flex flex-wrap align-center self-center justify-center wodefabu_fd2_0_c2_c1_c1'>
                <text>编辑</text>
              </view>
            </view>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->

      <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
        :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "tabsInfofd1_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabsTypefd1_0": "-1",
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        dataList: [],
        leixing: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      userInfo: {
        get() {
          return this.$store.state.userInfo
        },
        set() {
          this.$store.commit('updateUserInfo', value)
        },
      },
    },
    watch: {},
    onLoad(options) {
      this.$api.get(global.apiUrls.post5c78c4772da97, {}).then(res => {
        if (res.data.code == 1) {
          this.leixing = res.data.data.leixing
          // this.leixing = 0
        }
      })
      console.log('userInfo', this.userInfo)

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post65d551b3b6921;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          status: this.tabsTypefd1_0
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .wodefabu_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .wodefabu_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .wodefabu_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .wodefabu_fd0_0_c0 {
    width: 120rpx;
  }

  .wodefabu_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .wodefabu_linefd1_0 {
    background: rgba(58, 135, 249, 1);
    width: 50rpx;
    height: 8rpx;
    top: 80rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx;
  }

  .checkTitlefd1_0 {
    font-weight: 700 !important;
    font-size: 32rpx !important;
    color: #3A87F9 !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .wodefabu_benbenTabsfd1_0 {
    background: #fff;
    width: 750rpx;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
  }

  .wodefabu_fd2_0_c2_c1_c1 {
    background: var(--benbenbgColor2);
    width: 88rpx;
    height: 46rpx;
    font-size: 24rpx;
    line-height: 46rpx;
    color: var(--benbenFontColor3);
    border-radius: 8rpx;
  }

  .wodefabu_fd2_0_c2_c1_c0 {
    background: rgba(255, 105, 111, 1);
    width: 88rpx;
    height: 46rpx;
    font-size: 24rpx;
    line-height: 46rpx;
    color: var(--benbenFontColor3);
    margin: 0rpx 20rpx 0rpx 0rpx;
    border-radius: 8rpx;
  }

  .wodefabu_fd2_0_c2_c0 {
    color: rgba(247, 62, 69, 1);
  }

  .wodefabu_fd2_0_c1_c3_c0_c0 {
    width: 68rpx;
    height: 68rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
    border-radius: 50%;
  }

  .wodefabu_fd2_0_c1_c3_c0 {
    color: var(--benbenFontColor1);
    font-size: 32rpx;
  }

  .wodefabu_fd2_0_c1_c3 {
    margin: 30rpx 0rpx 10rpx 0rpx;
  }

  .wodefabu_fd2_0_c1_c2_1 {
    border-bottom: 2px solid var(--benbenbdColor1);
    color: rgba(102, 102, 102, 1);
    padding: 20rpx;
    border-radius: 16rpx;
  }

  .wodefabu_fd2_0_c1_c2 {
    border-bottom: 2px solid var(--benbenbdColor1);
    color: rgba(102, 102, 102, 1);
    padding: 0rpx 0rpx 20rpx 0rpx;

  }

  .wodefabu_fd2_0_c1_c1_c1 {
    background: rgba(249, 249, 249, 1);
    border-radius: 4rpx;
    height: 46rpx;
    line-height: 46rpx;
    padding: 0rpx 10rpx 0rpx 10rpx;
    color: var(--benbenFontColor1);
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .wodefabu_fd2_0_c1_c1_c0 {
    background: #3A87F9;
    border-radius: 4rpx;
    height: 46rpx;
    line-height: 46rpx;
    padding: 0rpx 10rpx 0rpx 10rpx;
    color: var(--benbenFontColor3);
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .wodefabu_fd2_0_c1_c1 {
    margin: 20rpx 0rpx 20rpx 0rpx;
  }

  .wodefabu_fd2_0_c1_c0_c1_c1 {
    color: var(--benbenFontColor1);
  }

  .wodefabu_fd2_0_c1_c0_c1_c0 {
    width: 32rpx;
    height: 32rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .wodefabu_fd2_0_c1_c0_c0 {
    font-size: 32rpx;
  }

  .wodefabu_fd2_0_c1 {
    background: rgba(249, 249, 249, 1);
    border-radius: 16rpx;
    background-size: 100% auto;
    padding: 24rpx;
    margin: 20rpx 0rpx 20rpx 0rpx;
  }

  .wodefabu_fd2_0_c0_c1 {
    font-size: 24rpx;
    color: var(--benbenFontColor4);
  }

  .wodefabu_fd2_0_c0 {
    font-size: 24rpx;
    color: var(--benbenFontColor1);
  }

  .wodefabu_fd2_0 {
    background: var(--benbenbgColor1);
    padding: 24rpx;
    background-size: 100% auto;
    margin: 10rpx 0rpx 0rpx 0rpx;
  }
</style>
